package com.dycx.message.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.dycx.common.dto.FieldsDTO;
import com.dycx.common.dto.handler.FieldsDtoListTypeHandler;
import com.dycx.common.entity.CommonDO;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.util.List;

@EqualsAndHashCode(callSuper = true)
@Data
@TableName(value = "message_template", autoResultMap = true)
public class TemplateDO extends CommonDO implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    private Integer id;

    private Integer messageType;
    private String name;
    private String code;

    @TableField(typeHandler = FieldsDtoListTypeHandler.class)
    private List<FieldsDTO> fields;
    private String content;
    private Integer sort;
    private Boolean status;
}
